﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using SystemCenterSoa.DtoModel.Attendance_Management;
using SystemCenterSoa.IRepository.Attendance_Management;
using SystemCenterSoa.PoModel.Attendance_Management;

namespace SystemCenterSoa.Service.Attendance_Management
{
    public   class AttendanceManagementService
    {

        private AttendanceManagementIRepository _attendanceManagementIRepository;

        public AttendanceManagementService(AttendanceManagementIRepository attendanceManagementIRepository)
        {
              _attendanceManagementIRepository= attendanceManagementIRepository;
        }

        public int AskLeavePoAdd(ApplyLeavePo oneForm)
        { 
            return _attendanceManagementIRepository.AskLeavePoAdd(oneForm);
        }

        public int BusinessTravelRequestPoAdd(BusinessTravelRequestPo twoForm)
        {
            return _attendanceManagementIRepository.BusinessTravelRequestPoAdd(twoForm);
        }

        public int FieldApplicationPoAdd(FieldApplicationPo threeForm)
        {
            return _attendanceManagementIRepository.FieldApplicationPoAdd(threeForm);
        }

        public int NotClockPoAdd(NotClockPo fourForm)
        {
            return _attendanceManagementIRepository.NotClockPoAdd(fourForm);
        }

        public int CompanyActivitiesPoAdd(CompanyActivitiesPo fiveForm)
        {
            return _attendanceManagementIRepository.CompanyActivitiesPoAdd(fiveForm);
        }

        public int DepartmentActivityPoAdd(DepartmentActivityPo sixForm)
        {
            return _attendanceManagementIRepository.DepartmentActivityPoAdd(sixForm);
        }


        public int WorkOvertimeLeaveAdd(WorkOvertimeLeavePo sevenForm)
        {
            return _attendanceManagementIRepository.WorkOvertimeLeaveAdd(sevenForm);
        }

        public object GetAllApplicationType()
        {
            return _attendanceManagementIRepository.GetAllApplicationType();
        }

        public ApplyLeavePo Edit(int id)
        {
            return _attendanceManagementIRepository.Edit(id);
        }

        public BusinessTravelRequestPo TwoEdit(int id)
        {
            return _attendanceManagementIRepository.TwoEdit(id);
        }
        public FieldApplicationPo ThreeEdit(int id)
        {
            return _attendanceManagementIRepository.ThreeEdit(id);
        }

        public NotClockPo FourEdit(int id)
        {
            return _attendanceManagementIRepository.FourEdit(id);
        }
        public CompanyActivitiesPo FiveEdit(int id)
        {
            return _attendanceManagementIRepository.FiveEdit(id);
        }
        public DepartmentActivityPo SixEdit(int id)
        {
            return _attendanceManagementIRepository.SixEdit(id);
        }
        public WorkOvertimeLeavePo SevenEdit(int id)
        {
            return _attendanceManagementIRepository.SevenEdit(id);
        }

        public object GetAllAskLeave(string depname, int year, int month, int pageIndex, int pageSize)
        {
            return _attendanceManagementIRepository.GetAllAskLeave(depname, year, month,pageIndex,pageSize);
        }

        
        public object GetAllBusinessTravelRequestPo(string depname, int year, int month, int pageIndex, int pageSize)
        {
            return _attendanceManagementIRepository.GetAllBusinessTravelRequestPo(depname, year, month, pageIndex, pageSize);
        }

        
         public object GetAllFieldApplicationPo(string depname, int year, int month, int pageIndex, int pageSize)
        {
            return _attendanceManagementIRepository.GetAllFieldApplicationPo(depname, year, month, pageIndex, pageSize);
        }

        public object GetAllNotClockPo(string depname, int year, int month, int pageIndex, int pageSize)
        {
            return _attendanceManagementIRepository.GetAllNotClockPo(depname, year, month, pageIndex, pageSize);
        }

        public object GetAllCompanyActivitiesPo(string depname, int year, int month, int pageIndex, int pageSize)
        {
            return _attendanceManagementIRepository.GetAllCompanyActivitiesPo(depname, year, month, pageIndex, pageSize);
        }

        public object GetAllDepartmentActivityPo(string depname, int year, int month, int pageIndex, int pageSize)
        {
            return _attendanceManagementIRepository.GetAllDepartmentActivityPo(depname, year, month, pageIndex, pageSize);
        }

        public object GetAllWorkOvertimeLeavePo(string depname, int year, int month, int pageIndex, int pageSize)
        {
            return _attendanceManagementIRepository.GetAllWorkOvertimeLeavePo(depname, year, month, pageIndex, pageSize);
        }


        //请假修改状态
        public int AskLeaveAudit(int status, int id, string modifi_name)
        {        
            return  _attendanceManagementIRepository.AskLeaveAudit(status,id,modifi_name);
        }

        public int BusinessTravelRequestPoAudit(int status, int id, string modifi_name)
        {
            return _attendanceManagementIRepository.BusinessTravelRequestPoAudit(status, id,modifi_name);
        }


        public int FieldApplicationPoAudit(int status, int id, string modifi_name)
        {
            return _attendanceManagementIRepository.FieldApplicationPoAudit(status, id,modifi_name);
        }


        public int NotClockPoAudit(int status, int id, string modifi_name)
        {
            return _attendanceManagementIRepository.NotClockPoAudit(status, id,modifi_name);
        }


        public int CompanyActivitiesPoAudit(int status, int id, string modifi_name)
        {
            return _attendanceManagementIRepository.CompanyActivitiesPoAudit(status, id,modifi_name);
        }


        public int DepartmentActivityPoAudit(int status, int id, string modifi_name)
        {
            return _attendanceManagementIRepository.DepartmentActivityPoAudit(status, id,modifi_name);
        }

        public int WorkOvertimeLeavePoAudit(int status, int id, string modifi_name)
        {
            return _attendanceManagementIRepository.WorkOvertimeLeavePoAudit(status, id,modifi_name);
        }

        public int AskLeaveDelete(List<int>ids)
        {
            return _attendanceManagementIRepository.AskLeaveDelete(ids);
        }

        public int BusinessTravelRequestPoDelete(List<int> ids)
        {
            return _attendanceManagementIRepository.BusinessTravelRequestPoDelete(ids);
        }
        public int FieldApplicationPoDelete(List<int> ids)
        {
            return _attendanceManagementIRepository.FieldApplicationPoDelete(ids);
        }

        public int NotClockPoDelete(List<int> ids)
        {
            return _attendanceManagementIRepository.NotClockPoDelete(ids);
        }
        public int CompanyActivitiesPoDelete(List<int> ids)
        {
            return _attendanceManagementIRepository.CompanyActivitiesPoDelete(ids);
        }
        public int DepartmentActivityPoDelete(List<int> ids)
        {
            return _attendanceManagementIRepository.DepartmentActivityPoDelete(ids);
        }

        public int WorkOvertimeLeavePoDelete(List<int> ids)
        {
            return _attendanceManagementIRepository.WorkOvertimeLeavePoDelete(ids);
        }

        //修改
        public int AskLeavePoUpdate(ApplyLeavePo form)
        {
            return _attendanceManagementIRepository.AskLeavePoUpdate(form);
        }
        public int BusinessTravelRequestPoUpdate(BusinessTravelRequestPo form)
        {
            return _attendanceManagementIRepository.BusinessTravelRequestPoUpdate(form);
        }
        public int FieldApplicationPoUpdate(FieldApplicationPo form)
        {
            return _attendanceManagementIRepository.FieldApplicationPoUpdate(form);
        }
        public int NotClockPoUpdate(NotClockPo form)
        {
            return _attendanceManagementIRepository.NotClockPoUpdate(form);
        }
        public int CompanyActivitiesPoUpdate(CompanyActivitiesPo form)
        {
            return _attendanceManagementIRepository.CompanyActivitiesPoUpdate(form);
        }
        public int DepartmentActivityPUpdate(DepartmentActivityPo form)
        {
            return _attendanceManagementIRepository.DepartmentActivityPUpdate(form);
        }
        public int WorkOvertimeLeaveUpdate(WorkOvertimeLeavePo form)
        {
            return _attendanceManagementIRepository.WorkOvertimeLeaveUpdate(form);
        }


        public List<AnnualLeaveStatisticsDto> GetAllAnnualLeaveStatisticsDto(string depname, string name, int year)
        {
            return _attendanceManagementIRepository.GetAllAnnualLeaveStatisticsDto(depname, name, year);
        }
        //部门加班费管理
        public List<DepartmentOvertimeManagementPo> GetDepartmentOvertimeManagementPo(string depname, int year, int month)
        {
          return  _attendanceManagementIRepository.GetDepartmentOvertimeManagementPo(depname, year, month);
        }

        //员工出勤显示
      public   List<EmployeeAttendanceSettingsPo> GetAllEmployeeAttendanceSettingsPo(string depname, int year, string username)
        {
            return _attendanceManagementIRepository.GetAllEmployeeAttendanceSettingsPo(depname, year, username);
        }

       public int UpdateEmployeeAttendanceSettingsPo(List<EmployeeAttendanceSettingsPo> tabledata)
        {
            return _attendanceManagementIRepository.UpdateEmployeeAttendanceSettingsPo(tabledata);
        }

        //部门经理设置
        public  List<DepartmentListPo> GetDepartmentListPo()
        {
            return _attendanceManagementIRepository.GetDepartmentListPo();
        }

        //节假日设置

        public object GetHolidaySettingsPo(int year)
        {
            return _attendanceManagementIRepository.GetHolidaySettingsPo(year);
        }
        //节假日
        public int AddHolidaySeason(DateTime date)
        {
            return _attendanceManagementIRepository.AddHolidaySeason(date);
        }
        public int DeleteHolidaySettingsPo(int id)
        {
            return _attendanceManagementIRepository.DeleteHolidaySettingsPo(id);
        }

        //特殊工作日
        public int AddSpecialWorkingDay(DateTime date)
        {
            return _attendanceManagementIRepository.AddSpecialWorkingDay(date);
        }
        //年假设置
        public List<AnnualLeaveSetPo> GetAnnualLeaveSetPo(string depname, int year)
        {
            return _attendanceManagementIRepository.GetAnnualLeaveSetPo(depname, year);
        }

        public int UpdateAnnualLeaveSetPo(List<AnnualLeaveSetPo> tabledata)
        {
            return _attendanceManagementIRepository.UpdateAnnualLeaveSetPo(tabledata);
        }

        //上传考勤
        public List<UploadAttendancePo> GetUploadAttendancePo(int year, int month)
        {
            return _attendanceManagementIRepository.GetUploadAttendancePo(year, month);
        }

        public int AddUploadAttendancePo(string name)
        {
            return _attendanceManagementIRepository.AddUploadAttendancePo(name);
        }

        public List<ComprehensiveStatisticsContractsProjectsPo> GetComprehensiveStatisticsContractsProjectsPo(string depname, int year)
        {
            var a = _attendanceManagementIRepository.GetComprehensiveStatisticsContractsProjectsPo(depname,year);
            return a;
        }
    }
}
